package com.ruoyi.nsh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.nsh.mapper.BusinessDepositRegisterMapper;
import com.ruoyi.nsh.domain.BusinessDepositRegister;
import com.ruoyi.nsh.service.IBusinessDepositRegisterService;

/**
 * 存款预约登记Service业务层处理
 * 
 * @author yys
 * @date 2025-01-13
 */
@Service
public class BusinessDepositRegisterServiceImpl implements IBusinessDepositRegisterService 
{
    @Autowired
    private BusinessDepositRegisterMapper businessDepositRegisterMapper;

    /**
     * 查询存款预约登记
     * 
     * @param id 存款预约登记主键
     * @return 存款预约登记
     */
    @Override
    public BusinessDepositRegister selectBusinessDepositRegisterById(Long id)
    {
        return businessDepositRegisterMapper.selectBusinessDepositRegisterById(id);
    }

    /**
     * 查询存款预约登记列表
     * 
     * @param businessDepositRegister 存款预约登记
     * @return 存款预约登记
     */
    @Override
    public List<BusinessDepositRegister> selectBusinessDepositRegisterList(BusinessDepositRegister businessDepositRegister)
    {
        return businessDepositRegisterMapper.selectBusinessDepositRegisterList(businessDepositRegister);
    }

    /**
     * 新增存款预约登记
     * 
     * @param businessDepositRegister 存款预约登记
     * @return 结果
     */
    @Override
    public int insertBusinessDepositRegister(BusinessDepositRegister businessDepositRegister)
    {
        businessDepositRegister.setCreateTime(DateUtils.getNowDate());
        return businessDepositRegisterMapper.insertBusinessDepositRegister(businessDepositRegister);
    }

    /**
     * 修改存款预约登记
     * 
     * @param businessDepositRegister 存款预约登记
     * @return 结果
     */
    @Override
    public int updateBusinessDepositRegister(BusinessDepositRegister businessDepositRegister)
    {
        businessDepositRegister.setUpdateTime(DateUtils.getNowDate());
        return businessDepositRegisterMapper.updateBusinessDepositRegister(businessDepositRegister);
    }

    /**
     * 批量删除存款预约登记
     * 
     * @param ids 需要删除的存款预约登记主键
     * @return 结果
     */
    @Override
    public int deleteBusinessDepositRegisterByIds(Long[] ids)
    {
        return businessDepositRegisterMapper.deleteBusinessDepositRegisterByIds(ids);
    }

    /**
     * 删除存款预约登记信息
     * 
     * @param id 存款预约登记主键
     * @return 结果
     */
    @Override
    public int deleteBusinessDepositRegisterById(Long id)
    {
        return businessDepositRegisterMapper.deleteBusinessDepositRegisterById(id);
    }
}
